package ernie.pages;

/**
 * @author Filip Lindqvist <buggfille@gmail.com>
 * @created 1:55:11 PM - Nov 16, 2011
 */
public class SimpleResponsePage extends HtmlPage {
    private final boolean success;

    public SimpleResponsePage(boolean success, String message) {
        super(message);
        this.success = success;
    }

    @Override
    public String file() {
        return "responce.html";
    }

    @Override
    public String getContent() {
        if (success) {
            return super.getContent();
        } else {
            return new Error404Page().getContent();
        }
    }

}
